//function loginCheck(){
//	formSubmitForAjax({
//		url:BASE_HREF + "800011.web"
//	});
//}

function loginSuccess(reslut,$form){
	try {
		if(reslut['RSPCOD'] === "000000"){
			toIndexPage();
//			alert(reslut['RSPMSG']);
		}else{
			alert(reslut['RSPMSG']);
		}
	} catch (e) {
		alert("请求失败");
	}
	
}


//加载完成执行注册
$(document).ready(function() {
	var USRMP = $.getCookie("USRMP");
	$('input[name="USRMP"]').val(USRMP);
	
	$('.register').on('click',function(){
		openUrl(BASE_PATH + "user/user_register.jsp");
	});
	
//	var USRMP = $.getCookie("USRMP");
//	$('input[name="USRMP"]').val(USRMP);
	
	$('.forget').on('click',function(){
		openUrl(BASE_PATH + "user/forget_code.jsp");
	});
});

var bg_obj = ".page-content";
var bg_class = "index-bg";
var bg_class_sel = ".index-bg";
var title_height = 45;
$(bg_obj).addClass(bg_class).css({
//	"background" : "url(images/bg-body.jpg)",
	"filter":"progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='scale')",  
	"-moz-background-size":"100% 100%",  
	"background-size":"100% 100%"
}).addClass("linear");
;

function indexSrawing() {
	var min_height = 400;
	var BG_WIDTH = document.documentElement.clientHeight;
	BG_WIDTH -= title_height;
	if (BG_WIDTH < min_height) {
		BG_WIDTH = min_height;
	}
	$(bg_class_sel).css({
		"height" : BG_WIDTH + "px"
	});

	// var $box = $('.dial-box');
	// var bodyH = $box.parent().height();
	// alert(BG_WIDTH - bodyH);
}

indexSrawing();

/**
 * 浏览器大小改变，对话框位置随之变化
 */
$(window).resize(function() {
	indexSrawing();
});
